//
//  UILabel+LXLabel.m
//  LvXi_newVersion
//
//  Created by 王敏 on 16/9/6.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "UILabel+LXLabel.h"

@implementation UILabel (LXLabel)
+(instancetype)labelWithTextColor:(UIColor*)textColor font:(UIFont*)font{
    UILabel * label = [[[self class] alloc] init];
    label.textColor = textColor;
    label.font = font;
    label.textAlignment = NSTextAlignmentCenter;
    return label;
}

+(instancetype)labelWithTextColor:(UIColor *)textColor backGroundColor:(UIColor *)backgroundColor font:(UIFont *)font{
    UILabel * label = [UILabel labelWithTextColor:textColor font:font];
    label.backgroundColor = backgroundColor;
    return label;
}


-(CGSize)textSize{
    return [self.text sizeInAre:MaxSize font:self.font];
}
@end
